home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 930413-01 < prev    next >
Encoding:
Text File  |  1993-05-21  |  2.6 KB  |  62 lines

  1. Newsgroups: comp.windows.x,comp.security.misc,comp.sys.sun.admin
  2. From: anthony@kurango.cit.gu.edu.au (Anthony Thyssen)
  3. Subject: Re: xdm xlogin and passwd aging
  4. Message-ID: <C5Er01.DH4@kurango.cit.gu.edu.au>
  5. Organization: Griffith University.
  6. References: <1993Apr7.230347.11793@fallout.lonestar.org>
  7. Date: Tue, 13 Apr 1993 05:52:48 GMT
  8.  
  9. castellanos@fallout.lonestar.org writes:
  10. | Does anyone have suggestions on how to implement password aging for X
  11. | terminal users logging in via xdm xlogin widget. Our environment is SunOS
  12. | 4.1.3, NCDware 2.4, NIS, NFS. Sun's password aging mechanism doesn't
  13. | support xlogin or NIS.
  14. |
  15. | Terry Castellanos                      Internet: castellt@tpd.eds.com
  16.  
  17. Yes we have just setup password aging for xlogin on our system. Basically
  18. we just created a simple program to test password aging for users.
  19. The program pwexp prints the number of weeks before the passwd expires,
  20. 0 if the passwd is expired, or 999 if no passwd aging is in effect.
  21. This in the Xsession file (lauch user session script) we added the following
  22.  
  23. --------------8<-----------CUT HERE--------------8<---------------
  24. # check for password expiry
  25. EXP_CHK="/usr/local/bin/pwexp"
  26. if [ -x /usr/local/bin/pwexp ]; then   # is passwd expiry available?
  27.   PW_EXP="`$EXP_CHK $USER`"                           # to be used later
  28.   if [ $PW_EXP -eq "0" ]; then
  29.      xmessage -name "Password Has Expired" -g +$Xcenter+10 \
  30.              "Your password has expired, please change it.."
  31.      xterm -g +$Xcenter+100 -ls -e /bin/passwd
  32.      PW_EXP="`$EXP_CHK $USER`"                        # to be used later
  33.      [ $PW_EXP -eq "0" ] && exit 0
  34.   fi
  35. else                       # no passwd expiry on this machine
  36.   PW_EXP=999
  37. fi
  38. unset EXP_CHK
  39.  
  40. # .... a bit later .... after failsafe login test ....
  41.  
  42. # present the MOTD and time to passwd expiry
  43. if [ ! -r $HOME/.hushlogin ]; then
  44.    xmessage -name "MOTD" -file - -g +$Xcenter+200 </etc/motd &
  45.    if [ $PW_EXP -le 3 ]; then
  46.       xmessage -name "Password Expiry Information" -g +$Xcenter+100 \
  47.                "Your password will expire within $PW_EXP week/s" &
  48.    fi
  49. fi
  50.  
  51. --------------8<-----------CUT HERE--------------8<---------------
  52.  
  53. NOTE: xmessage is a great program available in the general X contrib area.
  54. the Xcenter variable is calculated from other information for positioning
  55. message windows.
  56.  
  57.   Anthony Thyssen - (SysProg @ Griffith University)     anthony@cit.gu.edu.au
  58. ------------------------------------------------------------------------------
  59.           Think of it as `Evolution in Action'!     -- Larry Niven
  60. ------------------------------------------------------------------------------
  61.  
  62.